public class test13 {
    public static void main(String[] args) {
        String[] provinces = {"甘肃","陕西","四川"};
        String[][] citys = {
                {"兰州","天水","秦州"},
                {"西安","咸阳","宝鸡"},
                {"巴中","广元","成都"}
        };
        String p = "陕西";
        int postion = -1;
        for (int i=0;i<provinces.length;i++){
            if (provinces[i].equals(p)){
                postion = i;
                break;
            }
        }
        if(postion==-1){
            System.out.println("输入有误");
        }else {
            for (int i =0;i<citys[postion].length;i++) {
                System.out.println(citys[postion][i]);
            }
        }


    }
}
